<template>


  <div>

    <div style="height: 100px;margin-top: 0px ">
      <div style="float: left;width: 70%;height: 100%">
        <p style="color: black;font-size: 23px;line-height: 23px;font-weight: bold;height: 40px;margin-left: 40%">--  小组成员  --</p>
      </div>

    <div v-for="table in tableData" :key="table.projectname" style="float: left;margin-left: 85px;height: 550px;width: 400px ;background-color: white;margin-top: 50px;box-shadow: 0 8px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)" >
      <div  style="width: 300px;height: 200px">
        <img :src="table.photoUrl" style="width: 250px;height: 200px;margin-left: 70px;margin-top: 10px">
      </div>
      <div style="height: 60px;width: 350px;line-height: 0px;text-align: center">
        <div  class="text-wrapper" style="height: 30px;width: 400px;margin-top: 40px">
          <p>姓名：{{table.namee}}</p>
        </div>

        <!--<div class="text-wrapper" style="width: 300px;height:150px;white-space: pre-wrap;margin-top: 0px" >-->
        <div style="height: 200px;line-height: 0px ;margin-left: 60px">
          <p style="width: 300px;word-wrap: break-word;height: 150px;line-height: 30px ;margin-top: 30px;overflow: auto;text-align: center">简介： {{table.introduce}} </p>
          <!--</div>-->

        </div>
      </div>
    </div>

  </div>
  </div>




</template>

<script>
  export default {
    data() {
      return {
        tableData: [
          { id:'',
            namee:'',
            introduce:'',
            photoUrl:''
          }
        ]
      }
    },
    mounted: function(){
      let gid= this.$route.query.mallCode
      var user= JSON.parse(window.sessionStorage.getItem("user"));
      var ff=user.id
      axios.post('/workroom/findGroupM',{
        id : gid,
        wid:gid
      }).then((response) => {
        if( response.data != null){
          this.$notify({
            title: '成功',
            message: '成功',
            type: 'success',
            duration:2000
          });
          var e=response.data
          console.log(e)
          var data=[];
          for(var c=0;c<e.length;c++){

            var ee=e[c];
            console.log(ee)
            var obj={}
            obj.introduce=ee.introduce
            obj.namee=ee.namee
            obj.photoUrl=ee.photoUrl
            data[c]=obj
            console.log(obj)
          }
          console.log(data)
          this. tableData=data


        }
        else{
          this.$notify({
            title: '失败',
            message: '错误',
            type: 'warning',
            duration:2000
          });
        }
      })

    },
    methods: {

      jump(path){
        this.$router.replace({path:path})
      },


      handleEdit(index, row) {
        console.log(row.id)
        var ff=row.id


        axios.post('/admin/acceptWorkroomApply',{
          id : ff,
          idd  : ff
        }).then((response) => {
          if( response.data.states== 800){
            this.$notify({
              title: '成功',
              message: '成功',
              type: 'success',
              duration:2000

            });

            location.reload()
          } else{
            this.$notify({
              title: '失败',
              message: '错误',
              type: 'warning',
              duration:2000
            });
          }
        })


      },
      handleDelete(index, row) {
        console.log(index, row);
        var ff=row.id
        axios.post('/admin/refuseWorkroomApply',{
          id : ff,
          idd  : ff
        }).then((response) => {
          if( response.data.states== 800){
            this.$notify({
              title: '成功',
              message: '成功',
              type: 'success',
              duration:2000
            });
            location.reload()
          }
          else{
            this.$notify({
              title: '失败',
              message: '错误',
              type: 'warning',
              duration:2000
            });
          }
        })


      }

    }}
</script>



<style scoped>

  .text-wrapper {
    white-space: pre-wrap;
  }

</style>
